package com.xu.GOF23.Prototype.Demo1;

import java.util.Date;

//实现需要两步
//步骤：1.实现一个接口 Cloneable()的接口  ；2.重写一个方法 clone();
public class PrototypeVideo implements Cloneable {
    private String name;
    private Date createTime;//原创视频的创作时间

    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }

    //创建一个无参 构造 和有参构造器
    public PrototypeVideo() {

    }

    public PrototypeVideo(String name, Date createTime) {
        this.name = name;
        this.createTime = createTime;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "PrototypeVideo{" +
                "name='" + name + '\'' +
                ", createTime=" + createTime +
                '}';
    }
}
